<template>
  <div class="mb-80">
    <p>你本年在学习平台<span v-if="ilearning.learningTaskComplete">完成了<span class="strong-word">{{ ilearning.learningTaskComplete
    }}</span>个培训任务</span></p>
    <p>一共学习了<span class="strong-word">{{ ilearning.learningStudyCourse }}</span>门课程</p>
    <p>累计获得了<span class="strong-word">{{ ilearning.learningClassHours }}</span>学时</p>
    <p>{{ getTxt() }}</p>
  </div>
  <div class="mb-80">
    <p>你对<span class="strong-word">{{ ilearning.learningMostInterestingCategory }}</span>类别的课程最感兴趣</p>
    <p>猜你也喜欢以下课程</p>
    <p v-for="item in ilearning.learningRecommendedCourses.split(',')" :key="item">《<span class="strong-word">{{ item
    }}</span>》</p>
    <p>赶紧去看看吧</p>
  </div>
</template>

<script lang="ts" name="StudentPage" setup>
const props = defineProps<{
  ilearning: any;
}>();
const getTxt = () => {
  if (props.ilearning.learningStudyCourse === 0 || props.ilearning.learningClassHours === 0) {
    return `学如逆水行舟，不进则退，不要停止学习的步伐`;
  } else {
    return `学海无涯，愿你在知识的海洋中，乘风破浪，不断前行`;
  }
};
</script>

<style lang="scss" scoped>
p {
  line-height: 48px;
  // margin-bottom: 20px;
  font-size: 24px;
}
</style>
